import {productPage,producDetails} from '@/api/product'

const productService = {
  state: {},

  mutations: {},

  actions: {
    productPage({ commit },params) {
      return new Promise((resolve, reject) => {

        productPage(params).then(response => {
          const data = response.data
          resolve(data)
        }).catch(error => {
          reject(error)
        })
      })
    },
    producDetails({ commit },params) {
      return new Promise((resolve, reject) => {

        producDetails(params).then(response => {
          const data = response.data
          resolve(data)
        }).catch(error => {
          reject(error)
        })
      })
    },
     
  }
}

export default productService
